let vm = new Vue({
    el: '.main-content',
    data: {
        demand: {},
        aapp:{}
    },
    methods: {
        demandSelectPage: function (pageNum = 1, pageSize = 8) {
            axios({
                url: `mapper/demand/demandSelectPage/${pageNum}/${pageSize}`
            }).then(response => {
                this.demand = response.data.obj;
            }).catch(error => {
                console.log(error.message)
            })
        },
        toDemand: function (aapp) {
            layer.obj = aapp;
            layer.open({
                type: 2,      //表示弹出一个iframe
                title: false,  //是否设置标题
                // closeBtn: 0, //不显示关闭按钮
                // shade: [0],
                area: ['70%', '70%'],  //设置子窗口的宽高
                // offset: 'rb', //右下角弹出    //默认中间
                // time: 20000, //20秒后自动关闭
                // anim: 2,
                content: 'mapper/demand/toDemand', //iframe的url
                end: () => { //此处用于演示

                }
            })
        }
    },
    created: function () {
        this.demandSelectPage();
    }
});